package com.jiang.竞赛.Round76.D;

import java.util.PriorityQueue;
import java.util.Scanner;

/**
 * @author Jiang
 * @version 1.0
 * @date 2025/01/12 23:45
 */
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int k = in.nextInt();
        long res = 0;
        PriorityQueue<Integer> q = new PriorityQueue<>((a, b) -> b - a);
        for (int i = 0; i < n; i++) {
            q.offer(in.nextInt());
        }

        while ((m != 0 || k != 0) && !q.isEmpty()) {
            int num = q.poll();
            if (num == 0) {
                System.out.print(res);
                return;
            }

            if (num % 2 == 0 && m > 0) {
                q.offer(num / 2);
                m--;
            } else if (num % 2 != 0 && k > 0) {
                q.offer(num - 1);
                k--;
            } else {
                res += num;
            }
        }

        while (!q.isEmpty()) {
            res += q.poll();
        }

        System.out.print(res);
    }
}
